Skip to content

feat: GitHub release updates and Discord mod-update notifications - #369

Merged
cebarks merged 5 commits into
mainfrom
feature/github-notify-upstream
Jul 30, 2026
Merged

feat: GitHub release updates and Discord mod-update notifications#369
cebarks merged 5 commits into
mainfrom
feature/github-notify-upstream

Conversation

@cebarks

@cebarks cebarks commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Upstreams two features from @Dildz's fork (docker branch):

  • GitHub release update checks (src/github.rs) — mods installed from a GitHub release URL can now be checked for newer releases. Derived from the source_url already stored in the DB, cached per-repo for 15 min to stay under GitHub's anonymous rate limit.
  • Discord mod-update notifications (src/notify.rs) — background poller checks Forge + GitHub on a timer (default 30 min) and posts webhook embeds for newly available versions. Tracks what's been announced in an update_notifications table so it doesn't repeat itself across restarts. No webhook = no poller.
  • Full carousel + update flow integration — GitHub-sourced mods appear in the update carousel, badge count, and status partial alongside Forge mods. The "Update" button downloads and applies the latest GitHub release archive. update_mod_from_archive now accepts Option<i64> for version_id and an optional source_url to support both Forge and GitHub update paths.

Config

Field Env Default Description
discord_webhook_url QUMA_DISCORD_WEBHOOK_URL (unset) Discord webhook URL; unset = poller disabled
update_notify_interval QUMA_UPDATE_NOTIFY_INTERVAL 1800 Poll interval in seconds (min 300)

What's not included

The fork's adopt.rs (Docker-specific core-mod adoption via QUMA_MANAGE_* env vars) is not part of this PR — it's tied to the Docker compose orchestration model and needs separate design work to upstream.

Attribution

Both commits authored by Dildz via --author. Thanks to @Dildz for the original implementation in their quma-custom fork.

Test plan

  • cargo check — clean compile
  • cargo clippy -- -D warnings — clean
  • 824 lib tests pass (including 3 updated update_mod_from_archive call sites)
  • github::tests — URL parsing, rejection, version normalization
  • notify::tests — Discord embed format
  • Manual: set discord_webhook_url in config, verify embeds arrive when a mod has an update
  • Manual: install a mod from a GitHub release URL, verify update carousel shows it and update button works

Implemented with the help of Claude Code

Dildz and others added 5 commits July 29, 2026 22:33
Add two features from Dildz/quma-custom:

- GitHub release source (`src/github.rs`): mods installed from a GitHub
  release URL can now be checked for newer releases. The update check is
  derived from the source_url already stored in the DB — no new mod source
  type needed. Results are cached per-repo for 15 minutes to stay well
  under GitHub's anonymous rate limit.

- Discord update notifications (`src/notify.rs`): background poller checks
  Forge and GitHub for mod updates on a timer (default 30 min, min 5 min)
  and posts Discord webhook embeds for newly available versions. Already-
  announced versions are tracked in a new `update_notifications` table so
  the poller does not repeat itself across restarts. No webhook configured
  = no poller started.

Config: `discord_webhook_url` (string, optional) and
`update_notify_interval` (seconds, default 1800). Both support
`QUMA_DISCORD_WEBHOOK_URL` / `QUMA_UPDATE_NOTIFY_INTERVAL` env overrides.

Upstream: https://github.com/Dildz/quma-custom (docker branch)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Integrate GitHub-sourced mods into the full update UI:

- Update carousel shows GitHub mods alongside Forge mods, with a link to
  the GitHub releases page instead of Forge.
- Update badges count includes GitHub-sourced mods.
- Update status partial shows available GitHub versions.
- "Update" button on mod detail works for GitHub mods: downloads the
  latest release archive and applies it via update_mod_from_archive.
- update_mod_from_archive now accepts Option<i64> for version_id and an
  optional source_url, so it can record either a Forge version bump or a
  GitHub URL change. All existing callers pass Some(id) + None.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The refresh_updates endpoint only checked authentication but discarded
the user without verifying they had ModsUpdate permission, allowing any
logged-in user to invalidate the update cache.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FikaClient was constructed using fika.jsonc's backend_ip (a bind address,
typically 0.0.0.0), so in containerized deployments quma would try to
dial itself instead of the SPT server. Use config.server_host/server_port
(which know the actual reachable address) with fika.jsonc as fallback for
native installs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
validate_spt_dir() required SPT.Server.exe (Windows-only) and
BepInEx/plugins (client-side), so it rejected the exact Linux dedicated
server environment Quartermaster targets.

Switch to platform-agnostic markers:
- SPT.Server.deps.json (already parsed by read_spt_version)
- SPT_Data/configs/core.json
- SPT/user/mods

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cebarks
cebarks force-pushed the feature/github-notify-upstream branch from 89d9a84 to 886eb01 Compare July 30, 2026 07:13
@cebarks
cebarks enabled auto-merge (squash) July 30, 2026 07:16
@cebarks
cebarks merged commit 9b457ac into main Jul 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants